<template>
    <div class="parent">
        <ChildA @change="onAChanged" />
        <ChildB :name="name" />
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import ChildA from './ChildA.vue'
import ChildB from './ChildB.vue'

const name = ref('初始值')

const onAChanged = (nameVal: string) => {
    name.value = nameVal
}
</script>